package com;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;


public class HelloWorld extends JFrame{
	JLabel jLabel;
	JTextField jTextField;
	JButton jButton;
	//JTextArea jTextArea;
	public HelloWorld() 
	   { 
	      super(); 
	      this.setSize(300, 400); 
	      this.getContentPane().setLayout(null); 
	      this.add(getJLabel(), null);
	      
	      
	      this.add(getJTextField(), null);
	      this.add(getJButton(), null);
	      //this.add(getJTextArea(),null);
	      this.setTitle("HelloWorld");
	   } 
	  
	   private JLabel getJLabel() { 
	      if(jLabel == null) { 
	         jLabel = new javax.swing.JLabel(); 
	         jLabel.setBounds(34, 49, 53, 18); 
	         jLabel.setText("Name:"); 
	      } 
	      return jLabel;
	   } 
	  
	   private JTextField getJTextField() { 
	      if(jTextField == null) {
	         jTextField = new javax.swing.JTextField(); 
	         jTextField.setBounds(96, 49, 160, 20);
	      } 
	      return jTextField;
	   }
	   
//	   private JTextArea getJTextArea() { 
//		      if(jTextArea == null) {
//		    	  jTextArea = new JTextArea(100,100);
//		    	  //jTextArea.setBounds(150, 150, 80, 80);
//		    	 // jTextArea.setText("ccc");
//		    	  
//		      } 
//		      return jTextArea;
//		   } 
	  
	   private JButton getJButton() { 
	      if(jButton == null) { 
	         jButton = new javax.swing.JButton(); 
	         jButton.setBounds(103, 110, 71, 27); 
	         jButton.setText("OK");
	         jButton.addActionListener(new ActionListener() {
				
				@Override
				public void actionPerformed(ActionEvent e) {
					talkWindow talkwin = new talkWindow();
					talkwin.setVisible(true);
					
					
				}
			});
	         //jButton.setIcon(new ImageIcon("E:/MF_wordspace/MF_SVN/Source/ccc/src/img/2008521204245421_2.jpg"));
	      }
	      return jButton;
	   }

}
